/********************************************************************************
 *      Copyright:  (C) 2025 iot25<lingyun@email.com>
 *                  All rights reserved.
 *
 *       Filename:  proc.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(02/05/25)
 *         Author:  iot25 <lingyun@email.com>
 *      ChangeLog:  1, Release initial version on "02/05/25 16:54:47"
 *                 
 ********************************************************************************/
#ifndef  _PROC_H_
#define  _PROC_H_

#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>

#include "logger.h"

#define PID_SIZE  11


int proc_deamon(int daemon_flag, char *pidfile);

int proc_check_daemon(char *pidfile);

pid_t get_daemon_pid(char *pidfile);

int record_daemon_pid(char *pidfile);

int stop_background_running(char *pidfile);

#endif
